<template>
  <div class="mine-page">
      <h1>这是关于我页面!!!</h1>
      <hr>
      <div class="item">
          账号 : <input v-model="formData.account"/>
      </div>
      <div class="item">
          密码 : <input v-model="formData.pwd"/>
      </div>
      <div class="item">
          <button class="btn btn-success" @click="loginEvent">登录</button>
      </div>
  </div>
</template>

<script>
import { Login } from '../../http/api'
export default {
    data(){
        return {
            formData:{
                account:"admin",
                pwd:123456
            }
        }
    },
    methods:{
        loginEvent(){
            //发起请求
            Login(this.formData).then((res)=>{
                console.log(res);
            }).catch((err)=>{
                console.log('登录失败!:',err)
            })
            console.log('正在登录' , this.formData)
        }
    }
}
</script>

<style>
    .mine-page{
        width: 800px;
        margin: 50px auto;
    }
</style>